<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<h1>Transaction View</h1>
	<hr/>
	
	<table width="868" border="1">
	  <tr>
	    <td width="88">Pin Number:</td>
	    <td width="299">${transaction.pin}</td>
	    <td colspan="2"><strong>Sender Information</strong></td>
      </tr>
	  <tr>
	    <td>Product:</td>
	    
	    <td>${transaction.product.name }</td>
	    <td width="120">Name:</td>
	    <td width="333">${transaction.senderFirstName }&nbsp;${transaction.senderMidName }&nbsp;${transaction.senderLastName }</td>
      </tr>
	  <tr>
	    <td>Discount Number</td>	    
	    <td>${transaction.discount.discountNo}</td>	    	    
	    <td>Country:</td>
	    <td>${transaction.senderCountry}</td>
      </tr>
	  <tr>
	    <td>Date:</td>
	    <td>${transaction.createDate}</td>
	    <td>State/Province:</td>
	    <td>${transaction.senderState}</td>
      </tr>
	  <tr>
	    <td>Destination Address:</td>
	    <td>${transaction.receiverAddress},${transaction.receiverState},${transaction.receiverCountry}</td>
	    <td>City:</td>
	    <td>${transaction.senderCountry}</td>
      </tr>
	  <tr>
	    <td>Receiver name:</td>
	    <td>${transaction.receiverFirstName}&nbsp;${transaction.receiverMidName}&nbsp;${transaction.reciverLastName}</td>
	    <td>Address:</td>
	    <td>${transaction.senderAddress},${transaction.senderCity},${transaction.senderState},${transaction.senderCountry}</td>
      </tr>
	  <tr>
	    <td>Receiver mobilephone:</td>
	    <td>${transaction.receiverMobile}</td>
	    <td>Zipcode:</td>
	    <td>${transaction.zip}</td>
      </tr>
	  <tr>
	    <td>Amount:</td>
	    <td>${transaction.amount}</td>
	    <td>Email</td>
	    <td>${transaction.email}</td>
      </tr>
	  <tr>
	    <td>Price:</td>
	    <td>${transaction.price}</td>
	    <td>Mobilephone:</td>
	    <td>${transaction.senderMobile}</td>
      </tr>
	  <tr>
	    <td>Total  Price:</td>
	    <td>${totalPrice }</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
      </tr>
	  <tr>
	    <td>Transaction Status:</td>
	    <td>
		    <s:if test="transaction.status==0">
		    	UNPAID
		    	<div><s:property value=""/></div>    
		    </s:if>	    
		    <s:elseif test="transaction.status==1">
		    	PAID
			    <div><s:property value="PAID"/></div>
			</s:elseif>
			<s:elseif test="transaction.status==2">
				SENT
			    <div><s:property value="SENT"/></div>
			</s:elseif>
			<s:elseif test="transaction.status==3">
				RECEIVED
			    <div><s:property value="RECEIVED"/></div>
			</s:elseif>
			<s:elseif test="transaction.status==4">
				CANCELLED
			    <div><s:property value="CANCELLED"/></div>
			</s:elseif>
			<s:else>
			    <div>Unknow Status</div>
			</s:else>    
	    </td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
      </tr>
	</table> 
	<p>&nbsp;</p>
	<h2>&nbsp;</h2>
</body>
</html>